const mongoose = require('mongoose');
const { getMeta, preSave } = require('../helpers');

/** 定义 InventoryLog Schema */
const InventoryLogSchema = new mongoose.Schema({
  type: String,
  num: Number,
  userId: String,
  meta: getMeta(),
});

InventoryLogSchema.pre('save', preSave);

/** 注册 InventoryLog shecma */
mongoose.model('InventoryLog', InventoryLogSchema);
